//genrator函数。
function * abc(){
    yield 'first'
    yield 'second'
    yield 'thred'
    return 'over'
}
let a = abc()
// console.log(a.next())
// console.log(a.next())
// console.log(a.next())
// console.log(a.next())
// console.log(a.next())

for(let obj of a){
    console.log(obj);
    
}